Skip to content

fix: run c.i. checks when PRs are merged#428

Closed
CalMacCQ wants to merge 1 commit intomainfrom
CalMacCQ-patch-3
Closed

fix: run c.i. checks when PRs are merged#428
CalMacCQ wants to merge 1 commit intomainfrom
CalMacCQ-patch-3

Conversation

@CalMacCQ
Copy link
Collaborator

@CalMacCQ CalMacCQ commented Jan 4, 2025

Description

Update the workflow to run checks when PRs are merged in additon to running the tests prior to merging.

@CalMacCQ CalMacCQ requested review from cqc-alec and cqc-melf and removed request for cqc-melf January 4, 2025 17:16

on:
push:
branches: [ "main" ]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do we gain from this? Won't we just be repeating the tests that were run for the PR?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was more to bring the C.I. checks in line with what happens on other repositories. Unless I'm mistaken the docs build is tested for other pytket repos when commits are pushed to a branch in a PR and also when the PR is merged. At present only the former happens for pytket-docs.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like for pytket it is only run for pull_request and workflow_dispatch. https://github.com/CQCL/tket/blob/75d584f615d0de8129eb8f147222505f0ebdb2de/.github/workflows/build_and_test.yml#L315

It may be different on other repos, in which case perhaps we should change that. I don't see any point in running the check twice on exactly the same code...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Looking at the workflow for the extensions it seems it works in the way I thought?
https://github.com/CQCL/pytket-quantinuum/blob/main/.github/workflows/build_and_test.yml

I don't have a strong opinion either way... was only doing this for consistency. Fine with closing this if its unecessary.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even on that one the docs build is only run for pull_request and schedule triggers: https://github.com/CQCL/pytket-quantinuum/blob/42cd71c7d581c6c94bd3cde759673ce73c18a3a1/.github/workflows/build_and_test.yml#L148

For other unit tests I think we run using different Python versions on push to main, which is a compromise between thoroughness and saving time. But for the docs build I assume we only need to test with one Python version.

@CalMacCQ CalMacCQ closed this Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants